#!/usr/bin/env python
# -*- coding: utf-8 -*-


from .odoo import ODOO

import sys
from PySide2.QtWidgets import QApplication

from .main_win import MainWindow


def test():
    host = 'http://192.168.56.100:8069'
    host = 'http://106.13.191.63:8069'
    db = 'erpapp'

    user = 'admin'
    password = '123456'

    odoo = ODOO(host, db)
    res = odoo.rpc.authenticate(user, password)

    Ptn = odoo.env['res.partner.company.customer']

    # Ptn = odoo.env['res.partner']
    res = Ptn.search_read([], ['name'])

    print(res)


def main():
    app = QApplication(sys.argv)
    window = MainWindow()
    window.show()
    sys.exit(app.exec_())
